from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout
from PyQt6.QtCore import Qt


class ConstructionGuide(QWidget):
    """施工指南组件"""

    def __init__(self, parent=None):
        super().__init__(parent)
        self.init_ui()

    def init_ui(self):
        """初始化用户界面"""
        layout = QVBoxLayout(self)
        self.label = QLabel("施工指南区")
        self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
        self.label.setStyleSheet("""
            background-color: #f0f8ff;
            border: 1px solid #b0e0e6;
            border-radius: 5px;
            padding: 15px;
        """)
        layout.addWidget(self.label)

    def update_guide(self, pattern: str, modes: list):
        """更新施工指南"""
        self.label.setText(f"图案: {pattern}\n拼摆方式: {', '.join(modes)}")